/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package marifnst.jse71.using_loop_constructs;

/**
 *
 * @author arifnasution
 */
public class ForLoop
{
    public void sampleForLoop()
    {
        System.out.println("=== sample for loop");
        for (int i = 0; i < 5 ; i++)
        {
            System.out.println("for loop " + i);
        }
    }
    
    public void sampleForEachLoop()
    {
        System.out.println("=== sample foreach loop");
        String[] sampleArray = {"element_1", "element_2", "element_3"};
        for (String s : sampleArray)
        {
            System.out.println("for each loop " + s);
        }
    }
}
